import {
  defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  base: process.env.NODE_ENV === 'development' ? '/' : './',
  server: {
    // host:"10.7.173.101",
    // host:"192.168.137.1",
    open: true,
    port: 8888,
    proxy: {
      '/wanxiang': {
        target: 'http://www.shuiyue.info:15666',
        changeOrigin: true,
        rewrite: path => {
          return path.replace('/wanxiang', '')
        }
      }
    }
  }
})